package com.fancon.android.emoji;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URLDecoder;
import java.net.URLEncoder;

public class CreateEmojiMap {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		PrintWriter writer = new PrintWriter("map.txt");
		writer.println(URLDecoder.decode("%f0%9f%98%84","utf8")+"\tsmiles_01_01.png\tfight");
		writer.println(URLDecoder.decode("%f0%9f%98%8a","utf8")+"\tsmiles_01_02.png\tgift");
		writer.println(URLDecoder.decode("%f0%9f%98%83","utf8")+"\tsmiles_01_03.png\tgiveup");
		writer.println(URLDecoder.decode("%e2%98%ba","utf8")+"\tsmiles_01_04.png\tmusic");
		writer.println(URLDecoder.decode("%f0%9f%98%8d","utf8")+"\tsmiles_01_05.png\tspooky");
		writer.println(URLDecoder.decode("%f0%9f%98%98","utf8")+"\tsmiles_01_06.png\tfight");
		writer.println(URLDecoder.decode("%f0%9f%98%9a","utf8")+"\tsmiles_01_07.png\tfight");
		writer.println(URLDecoder.decode("%f0%9f%98%b3","utf8")+"\tsmiles_01_08.png\tfight");
		writer.println(URLDecoder.decode("%f0%9f%98%8c","utf8")+"\tsmiles_01_09.png\tfight");
		writer.println(URLDecoder.decode("%f0%9f%98%81","utf8")+"\tsmiles_01_10.png\tfight");
		writer.close();
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("map.txt")));
		String line = null;
		while((line=reader.readLine())!=null) {
			System.out.println(URLEncoder.encode(line,"utf8"));
		}
		reader.close();
	}

}
